﻿using JGSY.SmartIndustry.Dashboard.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Shell;

namespace JGSY.SmartIndustry.Dashboard.Views
{
    /// <summary>
    /// MainView.xaml 的交互逻辑
    /// </summary>
    public partial class MainView : Window
    {
        public MainView()
        {
            InitializeComponent();
            // 在高 DPI 环境下，WindowChrome 可能导致内容错位。
            WindowChrome.SetWindowChrome(this, new WindowChrome
            {
                NonClientFrameEdges = NonClientFrameEdges.None,
                UseAeroCaptionButtons = false
            });
            this.DataContext = new MainViewModel();
        }

        private void BtnMin_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Minimized;
        }

        private void BtnClose_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
